package com.zhl.hadoop.cases.phone;

import lombok.Data;
import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2020-10-29 12:23
 **/
@Data
public class PhoneFlow implements Writable {
	private Integer up;
	private Integer down;
	private Integer upAll;
	private Integer downAll;
	@Override
	public void write(DataOutput out) throws IOException {
		out.writeInt(up);
		out.writeInt(down);
		out.writeInt(upAll);
		out.writeInt(downAll);
	}

	@Override
	public void readFields(DataInput in) throws IOException {
		up = in.readInt();
		down = in.readInt();
		upAll = in.readInt();
		downAll = in.readInt();
	}

}
